based on a patch from Gary V. Vaughan, include "config.h" before any other
authorSven Neumann <sven@gimp.org>
Tue, 24 Feb 2009 21:17:27 +0000 (21:17 +0000)
committerSven Neumann <neo@src.gnome.org>
Tue, 24 Feb 2009 21:17:27 +0000 (21:17 +0000)
2009-02-24  Sven Neumann  <sven@gimp.org>

* */*.c: based on a patch from Gary V. Vaughan, include
"config.h"
before any other header file from all .c files.

* babl/babl-internal.h
* extensions/util.h: instead of including config.h from here,
bail
out if it wasn't included beforehand.

svn path=/trunk/; revision=394

59 files changed:
ChangeLog
babl/babl-component.c
babl/babl-conversion.c
babl/babl-core.c
babl/babl-cpuaccel.c
babl/babl-db.c
babl/babl-extension.c
babl/babl-fish-path.c
babl/babl-fish-reference.c
babl/babl-fish-simple.c
babl/babl-fish-stats.c
babl/babl-fish.c
babl/babl-format.c
babl/babl-hash-table.c
babl/babl-image.c
babl/babl-internal.c
babl/babl-internal.h
babl/babl-introspect.c
babl/babl-list.c
babl/babl-memory.c
babl/babl-model.c
babl/babl-sampling.c
babl/babl-sanity.c
babl/babl-type.c
babl/babl-util.c
babl/babl-version.c
babl/babl.c
babl/base/babl-base.c
babl/base/formats.c
babl/base/model-gray.c
babl/base/model-rgb.c
babl/base/model-ycbcr.c
babl/base/type-float.c
babl/base/type-u16.c
babl/base/type-u32.c
babl/base/type-u8.c
babl/gettimeofday.c
extensions/CIE-Lab.c
extensions/gegl-fixups.c
extensions/gggl-lies.c
extensions/gggl.c
extensions/gimp-8bit.c
extensions/naive-CMYK.c
extensions/util.h
tests/babl-html-dump.c
tests/babl_class_name.c
tests/babl_fish_path_dhtml.c
tests/babl_fish_path_fitness.c
tests/conversions.c
tests/formats.c
tests/grayscale_to_rgb.c
tests/introspect.c
tests/models.c
tests/nop.c
tests/rgb_to_bgr.c
tests/rgb_to_ycbcr.c
tests/sanity.c
tests/srgb_to_lab_u8.c
tests/types.c

index 86a7be4187e8a54541fa21c1e5957036e80098f7..dad62319dd579f7434abee2b684fd295a69344ef 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2009-02-24  Sven Neumann  <sven@gimp.org>
+
+       * */*.c: based on a patch from Gary V. Vaughan, include "config.h"
+       before any other header file from all .c files.
+
+       * babl/babl-internal.h
+       * extensions/util.h: instead of including config.h from here, bail
+       out if it wasn't included beforehand.
+
 2009-02-20  Martin Nordholts  <martinn@svn.gnome.org>
 
        * babl/babl.h: Include headers in babl.h as system headers
index 45a9b0acc6ce7ad243122d7bfea26b75aa3d4fd3..301e64df3e7fc61a350724f43797b3b5f6312940 100644 (file)
@@ -16,6 +16,7 @@
  * <http://www.gnu.org/licenses/>.
  */
 
+#include "config.h"
 #include "babl-internal.h"
 #include "babl-db.h"
 #include <string.h>
index bcb80cb1cc339a6a32f42bef12867359b59ab890..e08b2e653243a5e78e48764ba8e79485fbc37569 100644 (file)
@@ -17,6 +17,7 @@
  */
 
 
+#include "config.h"
 #include <string.h>
 #include <stdarg.h>
 #include <math.h>
index 91a59f246017e2a26022a2c869cdfb167e7125ed..f66b191eeb1c25d654517501f5d34c8656878d64 100644 (file)
@@ -15,6 +15,7 @@
  * <http://www.gnu.org/licenses/>.
  */
 
+#include "config.h"
 #include <string.h>
 #include "babl-internal.h"
 #include "babl-ids.h"
index e43c99ec395bda35ae5489b63bbb4e38530dfafb..a4202f2ce890ae7e0a173d45824087858eab0188 100644 (file)
@@ -28,7 +28,6 @@
  */
 
 #include "config.h"
-
 #include <string.h>
 #include <signal.h>
 #include <setjmp.h>
index 0b10daf8ed893b17460c3d6958b7b948f99fdf70..74413d88e42510afe479a67cdbe92f243ad734d5 100644 (file)
@@ -23,6 +23,7 @@
 
 #define _BABL_DB_C
 
+#include "config.h"
 #include <string.h>
 #include "babl-internal.h"
 
index e8866aca694a7979f522fda2a8fb68d4ba8b281b..1788bbd7c2f85fe1149a97e17597847b48fa0284 100644 (file)
@@ -18,9 +18,7 @@
 
 #define BABL_DYNAMIC_EXTENSIONS
 
-#ifdef HAVE_CONFIG_H
 #include "config.h"
-#endif
 
 #define BABL_PATH              LIBDIR BABL_DIR_SEPARATOR BABL_LIBRARY
 
index 038aaaa7e29f724fbf43db40c6adeef455d8892a..b6a6582b91a0baf111627cfdce2943b3a44650c5 100644 (file)
@@ -16,6 +16,7 @@
  * <http://www.gnu.org/licenses/>.
  */
 
+#include "config.h"
 #include <math.h>
 #include "babl-internal.h"
 
index 6f8253dcac1801f579819c09a8b45795e910ffde..0b1cc27f7b16a3e836ab0c1cadad59ed63a78c52 100644 (file)
@@ -16,6 +16,7 @@
  * <http://www.gnu.org/licenses/>.
  */
 
+#include "config.h"
 #include "babl-internal.h"
 
 static Babl *
index ecd6d0deba7aa00767fc365d5071042461e309c2..36908aaa3c2ce5a571c627195c97b76e3e72a014 100644 (file)
@@ -16,6 +16,7 @@
  * <http://www.gnu.org/licenses/>.
  */
 
+#include "config.h"
 #include "babl-internal.h"
 
 static char *
index efae3d4a5b64281e7bc12aebc30b07dce23e4230..a6c6980bd3bcd83167de33123a15bc6700233bab 100644 (file)
@@ -16,6 +16,7 @@
  * <http://www.gnu.org/licenses/>.
  */
 
+#include "config.h"
 #include "babl-internal.h"
 
 static FILE *output_file = NULL;
index a7b5cf7fd2a61d39355dad100906f5d36d9444f8..c446e36cf6643d5393eb686f2fba7f96d6d3568d 100644 (file)
@@ -16,6 +16,7 @@
  * <http://www.gnu.org/licenses/>.
  */
 
+#include "config.h"
 #include "babl-internal.h"
 #include <string.h>
 #include <stdarg.h>
index a9f68787937cd68132d27d7378fc4bb20b8a097b..f3fe36b8bf5003c47f48d34a0cd3a35df7f55a26 100644 (file)
@@ -16,6 +16,7 @@
  * <http://www.gnu.org/licenses/>.
  */
 
+#include "config.h"
 #include <string.h>
 #include <stdarg.h>
 #include <math.h>
index c48d48dc1fbe53433ed8095e2758582a434050e6..a468d4aa3af37fc48968d168f72a8439df86012d 100644 (file)
@@ -20,6 +20,7 @@
  * Copyright (C) 2008, Jan Heller
  */
 
+#include "config.h"
 #include "babl-internal.h"
 
 #define BABL_HASH_TABLE_INITIAL_MASK   0x7F
index eb1f6ff5e7e3d20fda92f330716f1458091dbd38..f54c87ea1e8cd9a67f126a56fdfa789ed45d59a7 100644 (file)
@@ -16,6 +16,7 @@
  * <http://www.gnu.org/licenses/>.
  */
 
+#include "config.h"
 #include <string.h>
 #include <stdarg.h>
 
index 8fd7fba085e04c32f31e81d1b8b48c93d0fab8e4..596e2688908fc464a5d53a93df9b543ad1dec200 100644 (file)
@@ -16,6 +16,7 @@
  * <http://www.gnu.org/licenses/>.
  */
 
+#include "config.h"
 #include <stdlib.h>
 #include "babl-internal.h"
 
index 7baf910ade9a7c3d110feb29343b41203bce2b3c..a43bb7b433c6b9d51caa966f16c0fd8d32a2b232 100644 (file)
 #ifndef _BABL_INTERNAL_H
 #define _BABL_INTERNAL_H
 
+#ifndef BABL_LIBRARY
+#error "config.h must be included prior to babl-internal.h"
+#endif
+
 #ifdef _BABL_H
 #error babl-internal.h included after babl.h
 #endif
@@ -36,8 +40,6 @@
 #include "babl.h"
 #define _BABL_INTERNAL_H
 
-#include "config.h"
-
 #include "babl-class.h"
 #include "babl-classes.h"
 #include "babl-introspect.h"
index 20adb56b83d808e64996be532d39dce73f6e7625..34cf9b43348ed372e76f22fa07818c38a48ffb16 100644 (file)
@@ -16,6 +16,7 @@
  * <http://www.gnu.org/licenses/>.
  */
 
+#include "config.h"
 #include "babl-internal.h"    /* for babl_log */
 
 #define BABL_LOG
index 8e539af41594ce787f0a1d9a663b5a1988fd63b8..898e8c54f628d4e00ac5eec697c3e182feb830af 100644 (file)
@@ -20,6 +20,7 @@
  * Copyright (C) 2008, Jan Heller
  */
 
+#include "config.h"
 #include "babl-internal.h"
 
 #define BABL_LIST_INITIAL_SIZE 0x7F
index adaece467e6144a4f1546bddd1ca8230fcaa19da..ea6e65d8857a72c32df36441c0126408eb461a09 100644 (file)
@@ -16,6 +16,7 @@
  * <http://www.gnu.org/licenses/>.
  */
 
+#include "config.h"
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
index e7e59ca317a6a9629636554c72b25884aa236d29..c78f1d85020e7d2782abc5ae92620fef75f1fe0b 100644 (file)
@@ -16,6 +16,7 @@
  * <http://www.gnu.org/licenses/>.
  */
 
+#include "config.h"
 #include <string.h>
 #include <stdarg.h>
 #include <math.h>
index 2698f8f9362f8957f15fa2813b6bcae2264d4ccf..d3fa63721285f0ac60944c3d3a5f6fd48a60acae 100644 (file)
@@ -21,6 +21,7 @@
 #define VERTICAL_MIN      1
 #define VERTICAL_MAX      4
 
+#include "config.h"
 #include "babl-internal.h"
 
 static BablSampling sampling_db[(HORIZONTAL_MAX - HORIZONTAL_MIN + 1) *
index 5f9e8eec57a8acbcc7685029f6468fde9cc5c4f9..5eb74b4c9104a0bfaf4c65a8cab740af848ad143 100644 (file)
@@ -16,6 +16,7 @@
  * <http://www.gnu.org/licenses/>.
  */
 
+#include "config.h"
 #include "babl-internal.h"
 
 static int OK;
index a1537acf6c729ba8b859367d2bd773dae701136b..c150e2ca52a302698e0db5cadfa287903846af55 100644 (file)
@@ -16,6 +16,7 @@
  * <http://www.gnu.org/licenses/>.
  */
 
+#include "config.h"
 #include <string.h>
 #include <stdarg.h>
 #include <math.h>
index e79e1b84c50e328e6a59de54bc1336d2a8902764..6abcd43bd2a317af134a2b634d2f2817f03cd9fe 100644 (file)
@@ -16,6 +16,7 @@
  * <http://www.gnu.org/licenses/>.
  */
 
+#include "config.h"
 #include <math.h>
 #include "babl-internal.h"
 
index b1805ef8a5e2b014b4bccedc88349c0162f91d52..81e4efdeedb9a9106906e6680e70585b031c5680 100644 (file)
@@ -16,6 +16,7 @@
  * <http://www.gnu.org/licenses/>.
  */
 
+#include "config.h"
 #include "babl-internal.h"
 
 
index 91ccb17ec71038190f4bb907387d1b51c8a6959e..08c43451e8a0a7777a9db643c0dcf6efa591ba34 100644 (file)
@@ -16,6 +16,7 @@
  * <http://www.gnu.org/licenses/>.
  */
 
+#include "config.h"
 #include "babl-internal.h"
 
 static int ref_count = 0;
index d8cbbf64b890695595eb84ed29105d1fa238efcd..1271a43dcb3fc48f189c9b6e48f2415d45daa00a 100644 (file)
@@ -16,6 +16,7 @@
  * <http://www.gnu.org/licenses/>.
  */
 
+#include "config.h"
 #include "babl-base.h"
 
 extern int babl_hmpf_on_name_lookups;
index 212b86a44bc79788d3158c2882e2f864806b0f01..5e6e0c0718f879085bd5a9f4cb9e1200765a6169 100644 (file)
@@ -16,6 +16,7 @@
  * <http://www.gnu.org/licenses/>.
  */
 
+#include "config.h"
 #include <stdlib.h>
 
 #include "babl-classes.h"
index f46eb59eb291580dcbf9c43a5375986cb9d06cab..e6b907c4e273182619d56fd390183238584f6e4b 100644 (file)
@@ -16,6 +16,7 @@
  * <http://www.gnu.org/licenses/>.
  */
 
+#include "config.h"
 #include <stdlib.h>
 
 #include "babl-classes.h"
index da772c79df8e40f5c68828090f827729ded997d0..46e443b704a875581b55af1b8b9fd0674885cde1 100644 (file)
@@ -16,6 +16,7 @@
  * <http://www.gnu.org/licenses/>.
  */
 
+#include "config.h"
 #include <stdlib.h>
 #include <math.h>
 
index dc766ece65b15788d9a37b15c4f2c5a7420ab554..c4f6ab95d9d9077953f1ac4b44fc6a0e00ab18ef 100644 (file)
@@ -16,6 +16,7 @@
  * <http://www.gnu.org/licenses/>.
  */
 
+#include "config.h"
 #include <string.h>
 #include <math.h>
 #include <assert.h>
index b8f7620d132b0c93f807635d605569b422f5575a..ce7e40749f74e8a95c25ffb37fd11dcf713d988b 100644 (file)
@@ -16,6 +16,7 @@
  * <http://www.gnu.org/licenses/>.
  */
 
+#include "config.h"
 #include <string.h>
 #include <assert.h>
 
index 1ff4bc251d31d51a6f275675a3508334ce1a6555..c09fe0f0f6df352ce8e57731cc00458f4b5dda46 100644 (file)
@@ -16,6 +16,7 @@
  * <http://www.gnu.org/licenses/>.
  */
 
+#include "config.h"
 #include <string.h>
 #include <stdint.h>
 #include <assert.h>
index f62d04334b893df84e9e467ecd8a140b6d22766d..aa168d1fa07f70abfcd944e4e9c5d4267ec57054 100644 (file)
@@ -16,6 +16,7 @@
  * <http://www.gnu.org/licenses/>.
  */
 
+#include "config.h"
 #include <string.h>
 #include <stdint.h>
 #include <assert.h>
index 29bd896e441aeee00c4b7daf6e41b8dd6dda9746..66b64124b86f8da41ababbc81d7f5ab75971e266 100644 (file)
@@ -16,6 +16,7 @@
  * <http://www.gnu.org/licenses/>.
  */
 
+#include "config.h"
 #include <string.h>
 #include <assert.h>
 #include <stdint.h>
index 33bf926052329c1aad2335a4ad63fd24d08081f5..6640abcf78991a8b98d4577f8be63cf8a66784f0 100644 (file)
@@ -6,6 +6,7 @@
  * By Wu Yongwei
  *
  */
+#include "config.h"
 
 #ifdef _WIN32
 
index 47cbbd5d35e575a56504f1e0bc5a6db55de19f16..c4b4a52af3f810326ca0de4d4ea57070194220d4 100644 (file)
@@ -16,6 +16,7 @@
  * <http://www.gnu.org/licenses/>.
  */
 
+#include "config.h"
 #include <math.h>
 #include <string.h>
 
index df4676accbe7b22c641449c6aee6e0fa93f4b605..4ee87a8659649c9fd870b4e691bc4e0bde8e2d33 100644 (file)
@@ -41,6 +41,7 @@
 
 #include <stdlib.h>
 
+#include "config.h"
 #include "babl.h"
 
 #include "base/util.h"
index 0fcfd7bd07ddc776ea8980c0a65925d8f834673e..b93d47c5c7dde31613b686bea9c25ebe8ce9b0ed 100644 (file)
@@ -23,6 +23,7 @@
  *  Copyright 2003, 2004, 2005 Øyvind Kolås <pippin@gimp.org>
  */
 
+#include "config.h"
 #include <math.h>
 #include <string.h>
 
index e24e51c61cda02aff6d1f7493ec625dc0320303f..faf28ecf8892bd30f964486d63b26008e6371eec 100644 (file)
@@ -21,6 +21,7 @@
  *  Copyright 2003, 2004, 2005 Øyvind Kolås <pippin@gimp.org>
  */
 
+#include "config.h"
 #include <math.h>
 #include <string.h>
 
index 7868cb88ff325ac2cb3e5358d748b98b8721a360..cd6b89f2b0b1ca4ead18649711b80e613d2b574f 100644 (file)
@@ -19,6 +19,7 @@
  * <http://www.gnu.org/licenses/>.
  */
 
+#include "config.h"
 #include <stdio.h>
 
 #include "babl.h"
index 783df349883579c549045d68d21ec9f07f455f75..75723da87be3a4886b3ca8c4cac4a7d82a6f0dc5 100644 (file)
@@ -17,7 +17,6 @@
  */
 
 #include "config.h"
-
 #include <math.h>
 #include <string.h>
 
index 1e6b070eceb86e59c77a31b048a10e704a049465..cb872f8685c74dce06d53e6da0be0923b88f3d90 100644 (file)
@@ -22,7 +22,9 @@
 #include <assert.h>
 #include <math.h>
 
-#include "config.h"
+#ifndef BABL_LIBRARY
+#error "config.h must be included prior to util.h"
+#endif
 
 #ifndef HAVE_RINT
 # define rint(f)  (floor (((double) (f)) + 0.5))
index 1f3def8356663aecaffd67e5cf4b97abb1711eb8..4c01611c77cc77fe996e80825fab86564803b2ab 100644 (file)
@@ -17,6 +17,7 @@
  *
  */
 
+#include "config.h"
 #include "babl-internal.h"    /* needed for babl_log */
 
 static void model_html (Babl *babl);
index 01e1c4150172627579df3946e572fbc098cdac21..8a7bab103dbf2c48ad7338f6ce619283809e349b 100644 (file)
@@ -16,6 +16,7 @@
  * <http://www.gnu.org/licenses/>.
  */
 
+#include "config.h"
 #include <string.h>
 #include <stdio.h>
 #include "babl-internal.h"
index b9f52f58ccc7f10968f33ba7b718019caf2b429f..b9bcadfe4de60624afd4659fc16a90d37d5c0623 100644 (file)
@@ -1,3 +1,4 @@
+#include "config.h"
 #include <stdlib.h>
 #include "babl-internal.h"
 
index 9ac312f386825c8cb68b56281c8ec427e28d0032..7090b4b10e7844f075e0966b13cbb907a571d559 100644 (file)
@@ -1,6 +1,7 @@
 /* perform a symmetricality of conversion test on a set of randomized
  * RGBA data */
 
+#include "config.h"
 #include <stdlib.h>
 #include <math.h>
 #include "babl-internal.h"
index 9efe2c6aca00091aad7459ddede2e79ffd205ba4..946bfb9b4a74c0a56a6270b6bda7947875852e0e 100644 (file)
@@ -1,6 +1,7 @@
 /* perform a symmetricality of conversion test on a set of randomized
  * RGBA data */
 
+#include "config.h"
 #include <stdlib.h>
 #include <math.h>
 #include "babl-internal.h"
index a3852f7f9a0712acb68a6b3af15ca2cc9816d713..8f481bbcabbd623e20b9097f107a59cf8e57a1fb 100644 (file)
@@ -1,6 +1,7 @@
 /* perform a symmetricality of conversion test on a set of randomized
  * RGBA data */
 
+#include "config.h"
 #include <stdlib.h>
 #include <math.h>
 #include "babl-internal.h"
index f73d186a1e859c70b73ce11d721f2d1524cb1e8d..8e004b9307cbaf98bb2c6ea880d6c80b491ed93c 100644 (file)
@@ -16,6 +16,7 @@
  * <http://www.gnu.org/licenses/>.
  */
 
+#include "config.h"
 #include "babl-internal.h"
 
 #define PIXELS    5
index fb5b8fcaef98b546fb2055b0f0df760a52d7b32a..b52ed9fb9d0d78a044c5211fa9be751ada2ae925 100644 (file)
@@ -16,6 +16,7 @@
  * <http://www.gnu.org/licenses/>.
  */
 
+#include "config.h"
 #include "babl-internal.h"
 
 int
index 1922a35d83a0c6af2c84b99c1c071f575dbb6323..2920c2f33ee8cd103dc4c3f9303e0696edc5c5ea 100644 (file)
@@ -1,6 +1,7 @@
 /* perform a symmetricality of conversion test on a set of randomized
  * RGBA data */
 
+#include "config.h"
 #include <stdlib.h>
 #include <math.h>
 #include "babl-internal.h"
index 883d9d8d258769b231e64e03510948593d1d82a6..7d79dc4aeddc7d7528d3c8b3290a13a6dd4693c3 100644 (file)
@@ -16,6 +16,7 @@
  * <http://www.gnu.org/licenses/>.
  */
 
+#include "config.h"
 #include "babl.h"
 
 int
index ddbadeb7c703fb449f01e73034995fec25752817..51986ee6a53f65c80e0d6bf6e0ac877f5036c19b 100644 (file)
@@ -17,6 +17,7 @@
  */
 
 
+#include "config.h"
 #include <math.h>
 #include "babl-internal.h"
 
index 26650980cb5f3bfdba8a66424054ae350927a0d1..6efc79620a3e9e844251a8a3313ce810b409e994 100644 (file)
@@ -17,6 +17,7 @@
  */
 
 
+#include "config.h"
 #include <math.h>
 #include "babl-internal.h"
 
index 482f21842c522b950aa825ffbccb94c5b878aaad..d0141c8b28510fbac8649fec49ec104c0cdd506a 100644 (file)
@@ -16,6 +16,7 @@
  * <http://www.gnu.org/licenses/>.
  */
 
+#include "config.h"
 #include "babl-internal.h"
 
 int
index 8d7c7b7287e77152dc113e0262a37664659ecc53..d3af0dde1a32e3a65d280fc3f598f8e73b5ec260 100644 (file)
@@ -16,6 +16,7 @@
  * <http://www.gnu.org/licenses/>.
  */
 
+#include "config.h"
 #include <math.h>
 #include "babl-internal.h"
 
index 9e53d2415929e60408b294215e7c3798d0c204b6..1b86ceaf6f452b37dc32d45e1b873a7e918da4ed 100644 (file)
@@ -1,3 +1,4 @@
+#include "config.h"
 #include <math.h>
 #include "babl-internal.h"